package com.ocom.mqsimple.feign;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.ocom.common.constant.AccessServiceUrl;
import com.ocom.common.entity.access.EntityAttendanceRules;
import com.ocom.common.entity.access.EntityMjGroupInfo;
import com.ocom.common.entity.access.EntityMjGroupPer;
import com.ocom.common.entity.master.EntityFileDownloadInfo;
import com.ocom.common.request.access.GetAttendanceRulesInfoReq;
import com.ocom.common.request.access.GetGroupPerReq;
import com.ocom.common.request.wx.UserAccessPageSetAccessRequest;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "access")
public interface AccessClientService {


    @PostMapping(AccessServiceUrl.URL_getZyResult)
    public Result getZyResult(@RequestParam("companyId") Long companyId ,@RequestParam("identity")  String identity,@RequestParam("name")  String name);

    @PostMapping(AccessServiceUrl.URL_WxChangeAccess)
    public Result setAccess(@RequestBody UserAccessPageSetAccessRequest request);

    @PostMapping(AccessServiceUrl.URL_UpdateFileStatus)
    public Result UpdateFileStatus(@RequestBody EntityFileDownloadInfo entityFileDownloadInfo);


    /**
     * 获取片区信息（getRegionInfo）
     * */
    @PostMapping(AccessServiceUrl.URL_getRegionInfo)
    Result getRegionInfo(@RequestBody JSONObject object);



    @PostMapping(AccessServiceUrl.Url_getGroupPerList)
    public Result<PageInfo<EntityMjGroupPer>> getGroupPerList(@RequestBody GetGroupPerReq req);


    @PostMapping(AccessServiceUrl.Url_getGroupList)
    public Result<List<EntityMjGroupInfo>> getGroupList(@RequestParam("companyId")Long companyId);


    @PostMapping(AccessServiceUrl.Url_attendanceRulesList)
    public Result<List<EntityAttendanceRules>> getAttendanceRuleList(@RequestBody GetAttendanceRulesInfoReq request) ;
}


